export default {
  state: { // this.$store.state.***
    evaluate: {} // 将 评估程序中的数据，存储到evaluate对象中， 咱们可以暂时将这个评估对象，设计成这个样子
    // { casNo,  lhsxbSrjdKeyValue, lhsxbBhzqyKeyValue,}
  },
  mutations: { // this.$store.commit('方法的名称', '按需传递唯一的参数')
    setBaseInformation(state, baseInformation) {
      if (baseInformation !== '') {
        console.log('state.baseInformation', baseInformation)
        state.evaluate.casNo = baseInformation.casNo
        console.log('state.evaluate.casNo', state.evaluate.casNo)
        state.evaluate.lhsxbSrjd = baseInformation.lhsxbSrjd
        state.evaluate.lhsxbBhzqy = baseInformation.lhsxbBhzqy
        state.evaluate.yjbz = baseInformation.yjbz
        state.evaluate.faWzlb = baseInformation.faWzlb
        state.evaluate.wzlb = baseInformation.wzlb
        state.evaluate.faClgy = baseInformation.faClgy
        state.evaluate.process = baseInformation.process
        state.evaluate.fiberId = baseInformation.fiberId
        state.evaluate.fiber = baseInformation.fiber
      }
      console.log('state.evaluate.faWzlb:', state.evaluate.faWzlb)
    },
    setDirectUsage(state, directUsage) {
      if (directUsage !== '') {
        console.log('state.directUsage', directUsage)
        state.evaluate.zjWzyl = directUsage.zjWzyl
        console.log('state.evaluate.zjWzyl', state.evaluate.zjWzyl)
        state.evaluate.zjDjl = directUsage.zjDjl
        state.evaluate.zjPfyzb = directUsage.zjPfyzb
        state.evaluate.zjJobtime = directUsage.zjJobtime
      }
    },

    setIndirectUsage(state, indirectUsage) {
      if (indirectUsage !== '') {
        console.log('state.indirectUsage', indirectUsage)
        state.evaluate.jjFzpl = indirectUsage.jjFzpl
        console.log('state.evaluate.jjFzpl', state.evaluate.jjFzpl)
        state.evaluate.jjYjl = indirectUsage.jjYjl
        state.evaluate.jjYxcfhl = indirectUsage.jjYxcfhl
        state.evaluate.jjFzpbl = indirectUsage.jjFzpbl
      }
    },
    setUsageParameter(state, usageParameter) {
      if (usageParameter !== '') {
        console.log('state.usageParameter', usageParameter)
        state.evaluate.zjWzyl = usageParameter.zjWzyl
        state.evaluate.zjDjl = usageParameter.zjDjl
        state.evaluate.zjPfyzb = usageParameter.zjPfyzb
        state.evaluate.zjJobtime = usageParameter.zjJobtime
        state.evaluate.jjFzpl = usageParameter.jjFzpl
        console.log('state.evaluate.jjFzpl', state.evaluate.jjFzpl)
        state.evaluate.jjYjl = usageParameter.jjYjl
        state.evaluate.jjYxcfhl = usageParameter.jjYxcfhl
        state.evaluate.jjFzpbl = usageParameter.jjFzpbl
      }
    },

    setAntifoulingMeasure(state, antifoulingMeasure) {
      if (antifoulingMeasure !== '') {
        console.log('state.antifoulingMeasure', antifoulingMeasure)
        state.evaluate.waterFwcs = antifoulingMeasure.waterFwcs
        console.log('state.evaluate.waterFwcs', state.evaluate.waterFwcs)
        state.evaluate.airFwcs = antifoulingMeasure.airFwcs
      }
    },
    setEmissionFactor(state, emissionFactor) {
      if (emissionFactor !== '') {
        console.log('state.emissionFactor', emissionFactor)
        state.evaluate.fixation = emissionFactor.fixation
        console.log('state.evaluate.fixation', state.evaluate.fixation)
        state.evaluate.fixationFlag = emissionFactor.fixationFlag
        state.evaluate.fixationAccording = emissionFactor.fixationAccording
        state.evaluate.residualLiquor = emissionFactor.residualLiquor
        state.evaluate.residualLiquorFlag = emissionFactor.residualLiquorFlag
        state.evaluate.residualLiquorAccording = emissionFactor.residualLiquorAccording
        state.evaluate.airPfxs = emissionFactor.airPfxs
        state.evaluate.airPfxsFlag = emissionFactor.airPfxsFlag
        state.evaluate.airPfxsAccording = emissionFactor.airPfxsAccording
        state.evaluate.soilPfxs = emissionFactor.soilPfxs
        state.evaluate.soilPfxsFlag = emissionFactor.soilPfxsFlag
        state.evaluate.soilPfxsAccording = emissionFactor.soilPfxsAccording
      }
    },
    setDailyEmissions(state, dailyEmissions) {
      if (dailyEmissions !== '') {
        console.log('state.dailyEmissions', dailyEmissions)
        state.evaluate.waterPfl = dailyEmissions.waterPfl
        console.log('state.evaluate.waterPfl', state.evaluate.waterPfl)
        state.evaluate.airPfl = dailyEmissions.airPfl
        state.evaluate.soilPfl = dailyEmissions.soilPfl
        state.evaluate.waterFunctionPath = dailyEmissions.waterFunctionPath
        state.evaluate.airFunctionPath = dailyEmissions.airFunctionPath
        state.evaluate.soilFunctionPath = dailyEmissions.soilFunctionPath
      }
    },
    setEvaluate(state){
      state.evaluate = {}
    }

  },
  getters: {
    getEvaluate: function(state) {
      console.log('state.evaluate', state.evaluate)
      return state.evaluate
    }
  },
  actions: {
  }
}
